import java.util.HashMap;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/27 10:37
 * @description:
 */
public class DictionaryDaoHashMap implements DictionaryDao {
HashMap<String,String> hashMap=new HashMap<String,String>();
  @Override
  public void add(EnglishDictuonary d) {
    hashMap.put(d.getEnglish(),d.getChinese());
  }

  @Override
  public String query(String english) {
   if (hashMap.containsKey(english)){
     return  hashMap.get(english);
   }


    return null;
  }
}
